package com.melodyframe.stage.spring;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.AbstractApplicationContext;

public class AnnotationConfigSpringStageModule extends
		AbstractSpringStageModule {
	private String[]	basePackages;

	@Override
	public AbstractApplicationContext createSubApplicationContext() {
		AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext();
		applicationContext.scan(this.getBasePackages());
		return applicationContext;
	}

	public String[] getBasePackages() {
		return basePackages;
	}

	public void setBasePackages(String[] basePackages) {
		this.basePackages = basePackages;
	}

}
